﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<!-- saved from url=(0089)http://169.254.158.100/zzdl/ContApply/Apply_list_do.asp?p_type=1&p_Applyno=10002010182564 -->
<HTML>
<HEAD><TITLE>采购计划明细</TITLE>
    <!--导入vue依赖-->
    <script th:src="@{/js/vue2.js}"></script>
    <!--导入axios依赖-->
    <script th:src="@{/js/axios.js}"></script>
    <!--导入分页组件-->
    <script th:src="@{/js/vuejs-paginate.js}"></script>
    <!--导入BootStrap框架所需的三个依赖-->
    <script th:src="@{/js/jquery.min.js}"></script>
    <META http-equiv=Content-Type content="text/html; charset=gb2312">

    <LINK href="css/style.css" rel=stylesheet>
    <META content="MSHTML 6.00.2900.5626" name=GENERATOR>
</HEAD>
<SCRIPT language=JAVASCRIPT>
    function back(){
        location.href = "Apply_daishencaiwu.html";
    }
</SCRIPT>
<BODY>
<div id="app">
    <CENTER>
        <TABLE style="LINE-HEIGHT: 30px" cellSpacing=1 cellPadding=0 width="100%"
               bgColor=#336699 borderColorLight=#006699 border=0>
            <TBODY>
            <TR>
                <TD>
                    <TABLE cellSpacing=1 cellPadding=3 width="100%" border=0>
                        <TBODY>
                        <TR bgColor=#ffffff>
                            <TD align=middle width="100%" bgColor=#ffffff colSpan=20
                                height=22>
                                <H2><FONT color=#0070c0><B>采购计划明细</B> <A
                                        onclick=""
                                        href=""><IMG alt=帮助
                                                     src="img/help_a.gif" border=0></A>
                                </FONT></H2></TD>
                        </TR>
                        <TR class=t1>
                            <TD width="20%">询价书名称：</TD>
                            <TD class=t2 width="30%"><A
                                    href="javascript:void(0)" @click="apply(enquireId)">{{ enquireName
                                }}</A></TD><!--<td>合同编号：</td>
  <td colspan=2>W20100040</td>-->
                            <TD width="20%">采购计划名称：</TD>
                            <TD class=t2 width="30%">{{ stockName }}</TD>
                        </TR>
                        <TR class=t1>
                            <TD width="20%">采购类型：</TD>
                            <TD class=t2 width="30%">{{ stockType }}</TD>
                            <TD width="20%">预算金额（元）：</TD>
                            <TD class=t2
                                width="30%">{{ budget }}
                            </TD>
                        </TR>
                        </TBODY>
                    </TABLE>
                </TD>
            </TR>
            </TBODY>
        </TABLE>

        <TABLE style="LINE-HEIGHT: 30px" cellSpacing=1 cellPadding=0 width="100%"
               bgColor=#336699 borderColorLight=#006699 border=0>
            <TBODY>
            <TR>
                <TD>
                    <TABLE cellSpacing=1 cellPadding=3 width="100%" border=0>
                        <TBODY>

                        <TR class=t1>
                            <TD noWrap align=middle width="20%">采购计划编号</TD>
                            <TD noWrap align=middle>采购计划名称</TD>
                            <TD noWrap align=middle>采购类型</TD>
                            <TD noWrap align=middle>预算金额<BR>（元）</TD>
                            <TD noWrap align=middle>计划询价开始时间</TD>
                            <TD noWrap align=middle>计划报价截止时间</TD>
                        </TR>
                        <TR class=t2 v-for="(stock,index) in searchResult.data">
                            <TD width="20%"><A
                                    href="javascript:void(0)"><FONT
                                    color=green>{{ stock.STOCK_NUM }}</FONT></A><BR></TD>
                            <TD align=right>{{ stock.STOCK_NAME }}<BR></TD>
                            <TD align=right>{{ stock.STOCK_TYPE }}<BR></TD>
                            <TD align=right>{{ stock.BUDGET }}<BR></TD>
                            <TD align=right>{{ stock.START_DATE }}<BR></TD>
                            <TD align=right>{{ stock.END_DATE }}<BR></TD>
                        </TR>
                        </TBODY>
                    </TABLE>
                </TD>
            </TR>
            </TBODY>
        </TABLE>
        </TD></TR></TBODY></TABLE></CENTER>
    <BR>
    <CENTER>
<!--        <INPUT @click="shenpi" type=button value=审批>-->
        <INPUT onclick="back()" type=button value=返回>
    </CENTER>
</div>
</BODY>

<script>
    var app = new Vue({
        el: "#app",
        data: {
            stockId: -1,
            userName: '', // 当前登录用户
            nowDate: '', // 当前日期
            enquireId: 0, // 询价书id
            enquireName: '', // 询价书名称
            stockName: '', // 采购计划名称
            stockType: '', // 采购类型
            searchResult: {//后端响应的结果

            },
        },
        methods: {
            init() {
                axios.get('/stock/getbyid', {
                    params: {
                        id: this.stockId
                    }
                }).then(result => {
                    this.searchResult = result.data
                    console.log(this.searchResult)
                    if (this.searchResult.data) {
                        this.enquireName = this.searchResult.data[0].ENQUIRE_NAME;
                        this.stockName = this.searchResult.data[0].STOCK_NAME;
                        this.stockType = this.searchResult.data[0].STOCK_TYPE;
                        this.budget = this.searchResult.data[0].BUDGET;

                    }
                })
            },
            shenpi() {
                sessionStorage.setItem('stockId', this.stockId);
                //获取数据
                const value = sessionStorage.getItem('stockId');
                console.log(value);

                window.document.location = "Apply_caiwushenpi.html";
            },
            apply() {
                sessionStorage.setItem('id', this.enquireId);
                //获取数据
                const value = sessionStorage.getItem('id');
                console.log(value);
                //跳转到Enquire_bianzhi.html页面
                window.location.href = 'Enquire_bianzhi.html';
            },
        },
        created() {
            this.stockId = sessionStorage.getItem('stockId');
            this.enquireId = sessionStorage.getItem('id');
            this.init();
        },

    })

</script>

</HTML>
